package com.cgy.utils.jmx;

import java.text.DecimalFormat;

/**
 * @author CH
 */
public class RateHelper {

    private static final DecimalFormat decimalFormat = new DecimalFormat("0.00%");
    /**
     *
     * @param value
     * @param max
     * @return
     */
    public static String rate(long value, long max) {
        double fm = (double)value / (double)max ;
        return decimalFormat.format(fm);
    }
}
